#coding=utf-8
from shanon import L
import sys

data_file = sys.argv[1]
#print data_file
content = open(data_file).read()
data = content.split('\n')
data2 = []
for line in data:
    if line:
        l = [float(i) for i in line.split('\t') if i]
        data2.append(l)
#print data2

r = []
for data in data2:
    l = L(data)
    r.append(['%.2f'%l.toShannonWeaver3(), '%.2f'%l.toSimpson()])

p = zip(*r)
for i in p:
    print '\t'.join(i)
    
    

